<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <jsp:include page="../include/public.jsp"></jsp:include>
    <jsp:include page="../include/easyui.jsp"></jsp:include>
    <script type="text/javascript" src="${root}/static/js/user/manage.js"></script>
</head>
<body>
			<div>
			    <form id="userfindform" method="post">
			        <fieldset style="border:1px solid #DDDDDD;">
				        <legend style="color:#0E2D5F;font-weight:800;">用户查询</legend>
				        <div>
				                             登录名称：<input class="easyui-textbox" name="map['username']">&nbsp;
				                             真实姓名：<input class="easyui-textbox" name="map['realname']">&nbsp;
				                             组织机构：<select style="width:173px;" class="easyui-combotree" 
				            	   data-options="method:'get',url:'${contextPath}/dept/list',id:'id',text:'text'" id="findDeptId" name="map['deptId']">
				               </select>&nbsp;
				               <a href="javascript:query()" class="easyui-linkbutton" iconCls="icon-search">查询</a>&nbsp;
				               <a href="javascript:queryReset()" class="easyui-linkbutton" iconCls="icon-back">重置</a>
				         </div>
			         </fieldset>
			    </form>
			</div>
			<div style="margin-top:10px;">
                <div style="padding-left:8px;" id="toolbar">
				    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:add()">添加</a>
				    <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="javascript:update()">修改</a>
				    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:delete()">删除</a>
		     	</div>
		    	<table id="userGrid" style="width:100%;min-height:300px;">
                </table>
			</div>
	
		<div style="width:618px;height:300px;padding-top:10px;padding-left:10px;padding-right:10px;" id="addUser" class="easyui-dialog" title="添加用户" data-options="closed:true,resizable:true,modal:true">
		    <form id="userForm" method="post">
		      <table style="width:100%;border-collapse:collapse;" class="common-table">
		        <tr>
		          <td style="background-color:#F1F6FF"><label>登录名称：</label></td>
		          <td><input type="text" class="easyui-textbox easyui-validatebox" required="true" name="username"
		          	  	  data-options="delay:500,validType:{remote:['validateUsername','username']}">
		          </td>
		          <td style="background-color:#F1F6FF"><label>登录密码：</label></td>
		          <td><input type="text" class="easyui-textbox easyui-validatebox" required="true" name="password"></td>
		        </tr>
		        <tr>
		          <td style="background-color:#F1F6FF"><label>真实姓名：</label></td>
		          <td><input type="text" class="easyui-textbox easyui-validatebox" required="true" name="realName"></td>
		          <td style="background-color:#F1F6FF"><label>性别：</label></td>
		          <td>
		            <select style="width:173px;" class="easyui-combobox" name="sex" data-options="multiple:false,editable:false,panelHeight:42">
		              <option value="男">男</option>
		              <option value="女">女</option>
		            </select>
		          </td>
		        </tr>
		        <tr>
		          <td style="background-color:#F1F6FF"><label>职务：</label></td>
		          <td>
		            <input type="text" class="easyui-combobox" name="dutyId"
		                data-options="multiple:false,editable:false,valueField:'dutyId',textField:'dutyName',method:'get',url:'${contextPath}/duty/findAllDuty'">
		          </td>
		          <td style="background-color:#F1F6FF"><label>部门：</label></td>
		          <td>
		            <select style="width:173px;" class="easyui-combotree" 
		            	data-options="method:'get',url:'${contextPath}/dept/list'" name="deptId">
		            </select>
		          </td>
		        </tr>
		        <tr>
		          <td style="background-color:#F1F6FF"><label>联系方式：</label></td>
		          <td><input type="text" class="easyui-textbox" name="mobile"></td>
		          <td style="background-color:#F1F6FF"><label>邮箱：</label></td>
		          <td><input type="text" class="easyui-textbox" name="email"></td>
		        </tr>
		        <tr>
		          <td style="background-color:#F1F6FF"><label>地址：</label></td>
		          <td><input type="text" class="easyui-textbox" name="address"></td>
		          <td style="background-color:#F1F6FF"><label>角色：</label></td>
		          <td>
		            <input id="roleIds" name="roleIds" class="easyui-combobox"
		                data-options="editable:false,multiple:true,valueField:'roleId',textField:'roleName',method:'get',url:'${contextPath}/role/findAllRole'">
		          </td>
		        </tr>
		        <tr>
		          <td colspan="4">
		            <a style="float:right;margin-right:20px;" id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="javascript:addCancel()">取消</a>
		            <a style="float:right;margin-right:20px;" id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="javascript:addUser()">确定</a>
		          </td>
		        </tr>
		      </table>
		    </form>
	    </div>	

</body>
</html>